﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System
{
    internal class Writer
    {
        static object obj = new object();

        /// <summary>
        ///  创建一个TXT文件
        /// </summary>
        /// <param name="FILE_NAME">文件路径</param>
        /// <param name="str">内容</param>
        public static void WriteFile(string FILE_NAME, string str)
        {
            lock (obj)
            {
                System.IO.StreamWriter sw = null;
                sw = System.IO.File.AppendText(FILE_NAME);
                sw.WriteLine(str);

                sw.Flush();
                sw.Close();
            }
        }
    }
}
